﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SMA = System.Management.Automation;

namespace RSPowershell
{
    [System.Management.Automation.Cmdlet("Get", "PrinterPaperSize")]
    public class Get_PrinterPaperSize : SMA.Cmdlet
    {

        [SMA.Parameter(Mandatory = false)]
        public string PrinterName;

        protected override void ProcessRecord()
        {
            var paper_sizes = PrintSystem.GetPaperSizes(this, this.PrinterName); 

            foreach (var size in paper_sizes)
            {
                this.WriteObject(size);
            }
        }
    }
}
